package com.app.entity.authority;


import javax.persistence.*;

import com.app.entity.BaseDto;
import com.app.entity.authority.Role;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Set;

/**
 *
 * @author zhangyufei
 * ��Ա�б�
 */
@Table(name="User")
public class User extends BaseDto {
	private static final long serialVersionUID = 1L;
	 
	public String name;//����





	protected String loginname;
	protected String departmentid;
	//@JsonProperty(value="introduction")
	protected String pic;
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}



	public String getLoginname() {
		return loginname;
	}

	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	public String getDepartmentid() {
		return departmentid;
	}

	public void setDepartmentid(String departmentid) {
		this.departmentid = departmentid;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}



 
	String email;//����

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
 
	String mobile;//�绰

	String password;



	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		return "User [username=" + name + ", userid=" + super.getId() + ", email="
				+ email + ", phone=" + mobile + ", password=" + password + "]";
	}

	Set<Role> roles;




	@OneToMany(fetch = FetchType.LAZY, mappedBy = "User")
	public Set<Role> getRoles() {
		return this.roles;
	}

	public void setSRoles(Set<Role> SysRoles) {
		this.roles = SysRoles;
	}



	private String empId;

	public String getEmpId() {
		return empId;
	}

	public void setEmpId(String empId) {
		this.empId = empId;
	}
}
